The present invention relates to a controller for a stepping motor and in particular to a controller that minimizes torque ripple.
A conventional stepping motor driver controls a stepping motor in response to a pulsed input signal from a motor controller. Whenever the driver receives an input signal pulse, the driver appropriately adjusts current on windings of the stepping motor such that the stepping motor rotates through a small, predetermined angle. Stepper motors are often used for precisely controlling movement of an object, for example, a stepping motor in a robot arm may move a load horizontally one centimeter for each revolution of the stepping motor, and the stepping motor may revolve once for each 100 input signal pulses supplied to its driver. A motor controller can easily control the distance the arm moves the load with a resolution of 1/100th of a centimeter by supplying the appropriate number of input signal pulses to the motor driver.
In many applications a controller must not only precisely control the total angular displacement of a stepping motor but also must precisely control its angular velocity and acceleration. For example, when a stepping motor is to operate at some constant angular velocity, a controller applies a pulsed input signal of the appropriate frequency to the stepping motor driver. However, since a stepping motor can accelerate or decelerate only at finite maximum rates, the motor controller should not abruptly change the frequency of an input signal to the motor driver in changing its angular velocity. Instead, the motor controller should gradually increase or decrease the frequency of the driver input signal thereby causing the stepping motor to accelerate or decelerate at a controlled rate.
My U.S. Pat. No. 4,734,847, incorporated herein by reference, describes a controller for supplying a pulsed signal input to a stepping motor driver in response to an input command from a host computer. The input command tells the controller the total angular displacement of the motor (e.g. 1,000,000 angular displacement steps), the desired rate of angular acceleration or deceleration of the stepping motor (e.g. 20,000 steps/sec.sup.2), and a maximum angular velocity of the stepping motor (e.g. 100,000 steps/sec). In response to the input data, the motor controller linearly increases the frequency of the pulsed input signal to the driver (e.g. from 0 to 100,000 pulses/sec) such that the motor accelerates with the desired angular acceleration up to the indicated maximum angular velocity. The controller then maintains the motor at that maximum velocity while counting the number of input signal pulses transmitted to the motor driver. The count enables the controller to determine how close the load is to its desired final angular displacement. At some point the controller begins decelerating the stepping motor at the desired deceleration rate by reducing the frequency of its pulsed output signal at a controlled rate. The controller chooses the point to commence deceleration such that when the stepping motor reaches zero angular velocity, the motor has rotated through the desired total angular displacement.
The motor controller described by the prior patent includes a computer periodically executing an interrupt routine that accumulates the acceleration data to determine a current angular velocity value. The interrupt routine also accumulates the angular velocity value to produce an angular displacement value. An overflow value resulting from the latter accumulation is proportional to a desired incremental angular displacement of the motor between interrupts. The interrupt routine stores this incremental angular displacement value in an external register, and the stored value controls the frequency of an output signal provided by a hardware rate multiplier. The rate multiplier output signal supplies the pulsed input signal to the stepping motor driver.
When a stepping motor accelerates or decelerates at a constant rate or rotates at a constant velocity, the motor applies a constant torque to its load. However, when the rate of change of frequency of the motor driver input signal oscillates about some nominal value, the stepping motor applies an oscillating torque to the load. This "torque ripple" shakes the load and can damage the load or its supporting structure. A controller should therefore minimize torque ripple by smoothly increasing or decreasing the frequency of the stepping motor driver input signal when accelerating or decelerating the stepping motor, and by holding the driver input signal at a constant frequency when the stepping motor is to operate at a constant angular velocity.
While the prior art motor controller provides precise control over stepping motor operation, the rate of change of the overflow data controlling the rate multiplier can oscillate about a value proportional to the desired acceleration due to the nature of the accumulation process providing the overflow data. Since the rate multiplier produces an output signal of frequency proportional to the overflow data, the rate of change of frequency of the driver input signal also oscillates about some nominal value, thereby causing torque ripple in the stepping motor particularly at low motor speeds. While the amount of torque ripple is unobjectionable in most applications, such torque ripple is nonetheless objectionable in some applications requiring exceptionally smooth motor operation at low angular velocities.